var t = require;
var e = module;
var o = exports;
var a,
    i =
        (this && this.__extends) ||
        ((a = function (t, e) {
            return (a =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                })(t, e);
        }),
        function (t, e) {
            a(t, e);
            function o() {
                this.constructor = t;
            }
            t.prototype = null === e ? Object.create(e) : ((o.prototype = e.prototype), new o());
        }),
    n =
        (this && this.__decorate) ||
        function (t, e, o, a) {
            var i,
                n = arguments.length,
                r = n < 3 ? e : null === a ? (a = Object.getOwnPropertyDescriptor(e, o)) : a;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, a);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (i = t[s]) && (r = (n < 3 ? i(r) : n > 3 ? i(e, o, r) : i(e, o)) || r);
            return n > 3 && r && Object.defineProperty(e, o, r), r;
        };
Object.defineProperty(o, "__esModule", {value: !0});
var r = cc._decorator,
    s = r.ccclass,
    c =
        (r.property,
        r.menu,
        (function (t) {
            i(e, t);
            function e() {
                return (null !== t && t.apply(this, arguments)) || this;
            }
            e.prototype.setKindData = function (t, e, o, a, i) {
                var n = e.split("_"),
                    r = [],
                    s = o,
                    c = n[0] + "",
                    p = CacheDataManager.getRewardKind(c);
                if ("0" == s) {
                    if (p.open_costume_rate) {
                        var l = p.open_costume_rate.split("_")[0],
                            d = PayData.getPayQualityEquip(t.type, a, i, l),
                            u = CacheDataManager.getCostumeup(),
                            h = this.setZBData(u[d]);
                        r.push({path: h, isZb: !0, idData: d, count: parseInt(n[1])});
                    } else if (p.value) {
                        (d = "" + p.value), (u = CacheDataManager.getCostumeup()), (h = this.setZBData(u[d]));
                        r.push({path: h, isZb: !0, idData: d, count: parseInt(n[1])});
                    }
                } else {
                    this._lay.active = !1;
                    r.push({path: s, isZb: !1, idData: c, count: parseInt(n[1])});
                    SpriteView.setTaskSprite(this._icon.$Sprite, s);
                }
                this._itemLab.$Label.string = "" + n[1];
                6 == p.type ? (this._starNodeCom.active = !0) : (this._starNodeCom.active = !1);
                return r;
            };
            e.prototype.setZBData = function (t) {
                var e = CacheDataManager.getCostume()[t.costume_id];
                this._starNodeCom.$StarNodeCom;
                this.setQualityData(t.quality);
                this._lay.active = !0;
                this._lay.$NodeKindItem.setTypeKind(e.type, t.quality);
                this._itemLab.$Label.string = "lv:1";
                SpriteView.setTaskSprite(this._icon.$Sprite, e.icon);
                return e.icon;
            };
            e.prototype.setQualityData = function (t) {
                SpriteView.setQualityBgLineColor(t, this._bgLine);
                SpriteView.setQualityBgColor(t, this._bgItem);
                var e = SpriteView.getQualityData(t);
                if (e) {
                    var o = e.star_num || 0;
                    this._starNodeCom.$StarNodeCom.setStarCount(o, e.star_path);
                }
            };
            return n([s], e);
        })(Thor));
o.default = c;
